<template>
  <view>
    <uv-navbar
      class="bold-title" 
      title="视频播放" 
      @leftClick="leftClick"
      :safeAreaInsetTop="true"
      :placeholder="true"
      :height="'44px'"
    ></uv-navbar>
  </view>
  <view class="video-container">
    <video
      class="video"
      :src="videoUrl"
      controls
      autoplay
    ></video>
  </view>
</template>

<script setup>


const leftClick = () => {
  uni.navigateBack();
};
import { ref, onMounted } from 'vue';
import { onLoad } from '@dcloudio/uni-app';

const videoUrl = ref('');

onLoad((options) => {
  if (options.address) {
    videoUrl.value = decodeURIComponent(options.address);
  }
});

</script>

<style scoped lang="scss">
.bold-title {
  font-weight: bold;
}
.video-container {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}
.video {
  width: 100%;
  height: 100%;
}
</style>
